
#ifndef DB_CLASS_H
#define DB_CLASS_H

#include <QObject>
#include<QSqlDatabase>
#include<QDateTime>

class db_class : public QObject
{
    Q_OBJECT
public:
    explicit db_class(QObject *parent = 0);
    int db_connect();
    void db_close();
    int db_account_table();
    int db_account_insert(QString,double);
    int db_account_update(QString,double,int);
    int budget_update(QString,double);
    int db_category_table();
    int db_category_insert(QString);
    int db_category_update(QString,QString);
    int db_category_delete(QString);
    int db_account_delete(int);
    int db_expense_table();
    //int db_exp_insert(int,QString,double,QString,QString);
    //int db_exp_update(int,int,QString,double,QString,QString);
    int db_exp_delete(int);


signals:

public slots:
private:
    QSqlDatabase db;

};

#endif // DB_CLASS_H

